package com.ls.lserp.modules.purchase.dao;




import java.util.List;

import com.ls.lserp.common.persistence.CrudDao;
import com.ls.lserp.common.persistence.annotation.MyBatisDao;
import com.ls.lserp.modules.common.entity.Material;
import com.ls.lserp.modules.order.entity.AuditInfo;
import com.ls.lserp.modules.purchase.entity.PurchaseAdvance;
import com.ls.lserp.modules.purchase.entity.PurchaseContract;
import com.ls.lserp.modules.setting.entity.Ognization;
import com.ls.lserp.modules.sys.entity.Brand;
@MyBatisDao
public interface PurchaseContractDao extends CrudDao<PurchaseContract>{
	//获取甲方公司信息
	public Ognization getPartyA(Ognization ognization);
	//原辅料一览
	public List<PurchaseContract> findMaterialList(PurchaseContract purchaseContract);
	//原辅料一览
	public List<PurchaseContract> searchMaterialList(PurchaseContract purchaseContract);
	//库存预警一览
	public List<PurchaseContract> findMaterialAlertList(PurchaseContract purchaseContract);
	//ID查找原辅料(大货)
	public List<PurchaseContract> findMaterialByIdOrder(PurchaseContract purchaseContract);
	//ID查找原辅料(定制)
	public List<PurchaseContract> findMaterialByIdMTM(PurchaseContract purchaseContract);
	//ID查找原辅料(预警)
	public List<PurchaseContract> findMaterialByIdAlert(PurchaseContract purchaseContract);
	/* 提交 */
	public int commitUpdate(PurchaseContract purchaseContract);
	//修改审核状态
	public int updateStatus(AuditInfo auditInfo);
	//修改合同状态
	public int updateContractStatus(AuditInfo auditInfo);
	//修改合同明细状态
	public int updateContractDetailStatus(AuditInfo auditInfo);
	//插入采购合同明细
	public int insertDetail(PurchaseContract purchaseContract);
	//插入采购面料单价明细
	public int insertmaterialCost(PurchaseContract purchaseContract);
	//删除采购合同明细
	public int deleteDetail(PurchaseContract purchaseContract);
	//删除采购面料单价明细
	public int deletematerialCost(PurchaseContract purchaseContract);
	//获取合同条款
	public PurchaseContract getClause(PurchaseContract purchaseContract);
	//获取客户供货商
	public List<Ognization> findOgnizationList();
	//获取品牌
    public List<Brand> findBrandList(Long ognizationId);
    // 品牌id查询
 	public String selectBrankId(Long ognizationId);
 	// 品牌中文名查询
 	public List<Brand> selectBrankNameCn(Material material);
 	//通过Id查询已创建采购合同的面料(定制)
 	public List<PurchaseContract> findPurchaseMaterialMtm(String materialId,String purchaseContractStatus);
 	//通过Id查询已创建采购合同的面料(大货、预警)
 	public List<PurchaseContract> findPurchaseMaterial(String materialId,String purchaseContractStatus,String ognizationIDB);
 	//通过Id查询已创建采购合同的面料(大货、预警)
 	public int updateReserverPurchaseStatus(String materialId,String ognizationIDB,String status,String alertStatus);
 	//获取面料库存预警数据状态
 	public List<PurchaseContract> findReserverPurchaseList(String materialId,String status);
 	
}
